﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp4
{
    class Student:Person
    {
        public  string major;
        public  string grade;

        public Student()
        {

        }
        public Student(int id, string name, char sex, int cardid, int tel,string major, string grade)
            :base (id,name,sex,cardid,tel)
        {
            this.major = major;
            this.grade = grade;
        }
        public void Speak()
        {
            base.SayHi();
            Console.WriteLine("专业:{0}"+"\n"+"年级:{1}", this.major, this.grade);
        }
        public string Major
        {
            get { return this.major; }
            set { this.major = value; }
        }
        public string Grade
        {
            get { return this.grade; }
            set { this.grade = value; }
        }
    }
}
